*** REPLICATION TOOLKIT ***

* AUTHORS: CIMINELLI DUVAL FURCERI 

* ARTICLE: EMPLOYMENT PROTECTION DEREGULATION AND LABOR SHARES IN ADVANCED ECONOMIES 

* JOURNAL: REVIEW OF ECONOMICS AND STATISTICS

* OUTPUT: FIGURE 3, PANEL C

***************************

cd ""

global horizon 6 
global ci = 1.645

************ PREPARE DATASET **********

run "Do files/Clean dataset"

************ ANALYSIS AND GRAPH **********

matrix baseline = J($horizon,4,.)

forvalues i= 1/$horizon {
quietly reghdfe  Y`i' r2 l1Y l2Y l3Y l4Y l1r2 l2r2 l3r2 l4r2 t2 ${f`i'2}, absorb(id_cross_section i.year#id_country i.year#id_industry) cluster(ifscode year) nocons
matrix results = r(table)
matrix baseline[`i',1] = results[1,1]
matrix baseline[`i',2] = results[2,1]
matrix baseline[`i',3] = results[1,1] + $ci*results[2,1]
matrix baseline[`i',4] = results[1,1] - $ci*results[2,1]
}
capture drop coeff2 ci_p2 ci_n2
matrix coeff2 = baseline[1...,"c1"]
matrix ci_p2 = baseline[1...,"c3"]
matrix ci_n2 = baseline[1...,"c4"]
svmat coeff2
svmat ci_p2
svmat ci_n2
capture drop horizon
egen horizon = group(year) 
replace horizon = . if coeff21==.

* Create graph
graph set window fontface "Times New Roman"
graph twoway line coeff2 ci_p2 ci_n2 horizon, graphregion(color(white)) ytitle("") xtitle("") yline(0, lcolor(black)) legend(off) xlab(1 "0"2 "1"3 "2"4 "3"5 "4"6 "5") lpattern(solid shortdash shortdash) lwidth (thick thick thick) lcolor(blue red red) ytitle("% change", height(5)) subtitle("{bf:Panel C.} Labor share") ysize(10) xsize(15)
graph copy C, replace
